SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TB_Recruit]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[TB_Recruit](
	[n4RecruitNo] [int] IDENTITY(1,1) NOT NULL,
	[strName] [nvarchar](50) NULL,
	[strPersonalNo] [varchar](50) NULL,
	[strPhone] [varchar](14) NULL,
	[strEmail] [varchar](200) NULL,
	[strPostNo] [varchar](10) NULL,
	[strAddress] [nvarchar](300) NULL,
	[strHopeStore] [nvarchar](200) NULL,
	[n1JobTime] [tinyint] NULL,
	[strAcademic] [nvarchar](max) NULL,
	[strCareer] [nvarchar](max) NULL,
	[strLicense] [nvarchar](max) NULL,
	[strFileURL] [varchar](200) NULL,
	[n1Status] [tinyint] NULL,
	[dtCreateDate] [datetime] NOT NULL,
	[dtModifyDate] [datetime] NOT NULL,
	[strManagerName] [nvarchar](50) NULL,
	[strDescription] [nvarchar](2000) NULL,
 CONSTRAINT [PK_TB_Recruit] PRIMARY KEY CLUSTERED 
(
	[n4RecruitNo] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO

IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[TB_Recruit]') AND name = N'IX_TB_Recruit_n1JobTime_n4RecruitNo')
CREATE NONCLUSTERED INDEX [IX_TB_Recruit_n1JobTime_n4RecruitNo] ON [dbo].[TB_Recruit] 
(
	[n1JobTime] ASC,
	[n4RecruitNo] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
GO

IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[TB_Recruit]') AND name = N'IX_TB_Recruit_n1Status_n4RecruitNo')
CREATE NONCLUSTERED INDEX [IX_TB_Recruit_n1Status_n4RecruitNo] ON [dbo].[TB_Recruit] 
(
	[n1Status] ASC,
	[n4RecruitNo] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
